#include "CStd.h"
/*****************************************************/
#include <stdlib.h> // Deklaracja NULL !
#include <string.h>

CStd::CStd()
{
	i_Width = i_Height = 0;
	m_RawData = NULL;
}
CStd::~CStd()
{
	

}

unsigned char**	CStd::GetRawDataPtr()
{
	return (unsigned char**)&(m_RawData);
}

unsigned int CStd::GetHeight(){
	return i_Height;
}

unsigned int CStd::GetWidth(){
	return i_Width;
}

void CStd::Flush()
{
   if(m_RawData) delete [] m_RawData;	
	i_Width = i_Height = 0;

}

unsigned char	CStd::GetId()
{
	return uc_Identi;
}

void	CStd::SetData(unsigned char* m_Data, int w, int h)
{
	m_RawData = new unsigned char[w*h*3];
	memcpy(m_RawData, m_Data, w*h*3);

	
	i_Width = w;
	i_Height = h;
}

unsigned char*	CStd::ConvertRawDataToUni()
{
	return (unsigned char*)m_RawData;
}